home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / action.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  1KB  |  69 lines

  1. #ifndef __ACTION
  2. #define __ACTION
  3.  
  4. struct action
  5.  {
  6.   int act;
  7.   int x,y,z; // parameters used ad.lib.
  8.  };
  9.  
  10. struct Action
  11.  {
  12.   int act;
  13.   int x,y,z; // parameters used ad.lib.
  14.   Action() : act(0),x(0),y(0),z(0){}
  15.  };
  16.  
  17.  
  18. // common action constants ( local constants could be defined elsewhere)
  19. // values 0 - 100 are reserved
  20.  
  21. #define AC_NULL   0
  22. #define AC_CANCEL 1
  23. #define AC_ACCEPT 2
  24. #define AC_OK      AC_ACCEPT
  25. #define AC_HELP   3
  26. #define AC_SELECT 4
  27. #define AC_LEFT   5
  28. #define AC_RIGHT  6
  29. #define AC_UP     7
  30. #define AC_DOWN   8
  31. #define AC_UNDO   9
  32. #define AC_SET   10
  33. #define AC_ERASE 11
  34. #define AC_YES    12
  35. #define AC_NO     13
  36. #define AC_DEFAULT 14
  37. #define AC_QUIT   15
  38. #define AC_ERROR  16
  39. #define AC_CLOSE  17
  40. #define AC_NEXT   18
  41. #define AC_PREV   19
  42. #define AC_PG_UP 20
  43. #define AC_PG_DN 21
  44. #define AC_HOME 22
  45. #define AC_END 23
  46. #define AC_CTRL_PG_UP 24
  47. #define AC_JMP 25
  48. #define AC_REDRAW 26
  49. #define AC_MOVE 27
  50. #define AC_RESIZE 28
  51. #define AC_CTRL_PG_DN 29
  52. #define AC_EDIT 30
  53. #define AC_FIND_FIRST 31
  54. #define AC_FIND_NEXT 32
  55. #define AC_GLOBAL_ERASE 33
  56.  
  57. // about 10 more actions could be defined there !!
  58.  
  59. //action default_key2action(int key /* from event */);
  60.   // could be VERY useful procedure
  61.  
  62. /*
  63.   virtual functions in some basical class(es)
  64.    action get_action();
  65.    void handle(action act); or         action handle(action act,...); ?
  66.  
  67. */
  68. #endif __ACTION
  69.